;;;
;;;
;;;	Authors: Jason Asbill &
;;;              Henry C. Francis
;;;		 425 N. Ashe St.
;;;		 Southern Pines, NC 28387
;;;		 http://paracadd.com
;;;		 All rights reserved.
;;;
;;;		 COPYRIGHT: 
;;;		    EDITED: 
;;;
(defun c:imparea ()
  (princ "\nSelect impervious areas: ")
  (setq addents (ssget '((-4 . "<OR")(0 . "LWPOLYLINE")(0 . "POLYLINE")(-4 . "OR>"))))
  (setq cnt 0
        sslen (sslength addents)
        addareas 0
  )
  (while (< cnt sslen)
    (setq enamelst (cons (ssname addents cnt) enamelst))
    (command ".area" "a" "o" (ssname addents cnt) "" "")
    (setq addareas (+ addareas (getvar "area")))
    (setq cnt (1+ cnt))
  )
  (princ "\nImpervious area total: ")
  (princ addareas)
  (princ "\nSelect open space areas: ")
  (setq subents (ssget '((-4 . "<OR")(0 . "LWPOLYLINE")(0 . "POLYLINE")(-4 . "OR>"))))
  (setq cnt 0
        sslen (sslength subents)
        subareas 0
  )
  (while (< cnt sslen)
    (command ".area" "a" "o" (ssname subents cnt) "" "")
    (setq subareas (+ subareas (getvar "area")))
    (setq cnt (1+ cnt))
  )
  (princ "\nOpen space area total: ")
  (princ subareas)
  (princ "\nSelect property boundary: ")
  (setq bndent (ssget '((-4 . "<OR")(0 . "LWPOLYLINE")(0 . "POLYLINE")(-4 . "OR>"))))
  (command ".area" "a" "o" (ssname bndent 0) "" "")
  (setq bndarea (getvar "area"))
  (princ "\nProperty boundary area: ")
  (princ bndarea)
  (princ "\nImpervious area percentage: ")
  (setq impareapct (* 100.0(/(- addareas subareas) bndarea)))
  (princ (rtos impareapct 2 2))
  (PRINC "%")
  (princ)
)